import Home from '~/pages/home/Home.vue';
// 页面内使用 definePageMeta({layout: 'main'}) 会失效
const reRouter = [
    {
        path: '/',
        name: 'Home',
        component: Home,
        meta: {
            pageName: '首页',
            navigationBar: true,
            middleware: ["auth"]
        }
    },
    {
        path: '/writingtext',
        name: 'writingtext',
        component: () => import('@/pages/writingtext/index.vue'),
        meta: {
            pageName: '文字撰写',
            // navigationBar: true,
            middleware: ["auth"]
        }
    },
    {
        path: '/seoCustomer',
        name: 'seoCustomer',
        component: () => import('@/pages/seoCustomer/index.vue'),
        meta: {
            pageName: 'SEO定制',
            // navigationBar: true,
            middleware: ["auth"]
        }
    },
    {
        path: '/softArticlePromotion',
        name: 'softArticlePromotion',
        component: () => import('@/pages/softArticlePromotion/index.vue'),
        meta: {
            pageName: '软文推广',
            // navigationBar: true,
            middleware: ["auth"]
        }
    },
    {
        path: '/websiteOptimization',
        name: 'websiteOptimization',
        component: () => import('@/pages/websiteOptimization/index.vue'),
        meta: {
            pageName: '网站优化',
            // navigationBar: true,
            middleware: ["auth"]
        }
    },
    {
        path: '/websiteIntermodalTransportation',
        name: 'websiteIntermodalTransportation',
        component: () => import('@/pages/websiteIntermodalTransportation/index.vue'),
        meta: {
            pageName: '网站联运',
            // navigationBar: true,
            middleware: ["auth"]
        }
    },
    {
        path: '/aboutus',
        name: 'aboutus',
        component: () => import('@/pages/aboutus/index.vue'),
        meta: {
            pageName: '关于我们',
            // navigationBar: true,
            middleware: ["auth"]
        }
    },
    {
        path: '/mine',
        name: 'mine',
        component: () => import('@/pages/mine/index.vue'),
        meta: {
            navigationBar: true,
            middleware: ["auth"]
        }
    },
    {
        path: '/preview',
        name: 'preview',
        component: () => import('@/pages/manuscriptPreview/index.vue'),
        meta: {
            middleware: ["auth"]
        }
    },
    // 此页面为聊天页
    {
        path: '/customerService',
        name: 'customerService',
        component: () => import('@/pages/customerService/index.vue'),
        meta:{
            ssr: false
        }
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/pages/login/index.vue'),
        meta: {
            pageName: '登录注册',
            middleware: ["auth"]
        }
    },
    {
        path: '/dimensional',
        name: 'dimensional',
        component: () => import('@/components/common/views/dimensional.vue'),
        meta: {
            pageName: '二维码支付',
            middleware: ["auth"]
        }
    },
    {
        path: '/dimensionalZfb',
        name: 'dimensionalZfb',
        component: () => import('@/components/common/views/dimensionalZfb.vue'),
        meta: {
            middleware: ["auth"]
        }
    },
    {
        path: '/manuscriptCenter',
        name: 'manuscriptCenter',
        component: () => import('@/components/mobileComponent/manuscriptCenter.vue'),
        meta: {
            navigationBar: true,
            middleware: ["auth"],
        }
    },
    {
        path: '/pcAgreement',
        name: 'pcAgreement',
        component: () => import('@/pages/serviceAgreement/index.vue'),
        meta: {
        }
    },
    // {
    //       path: '/mine-a',
    //       name: 'Mine',
    //       component: ()=> import('../pages/mine/index.vue'),
    //       meta: {
    //         layout: 'main', // 通过此种方式使用 自定义布局
    //       }
    //     },
]
export default {
    routes: (_routes: any) => [
        // ..._routes,
        ...reRouter,
    ],
}